# 构建阶段：使用 openjdk:11 + maven
FROM maven:3.9.4-openjdk-11 AS build
WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests

# 运行阶段
FROM openjdk:11-jre-slim
WORKDIR /app
COPY --from=build /app/target/*.jar redis-hot-key-client-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "redis-hot-key-client-0.0.1-SNAPSHOT.jar"]
